package top.tomxwd.service;

import feign.hystrix.FallbackFactory;

/**
 * @author xieweidu
 * @createDate 2020-08-06 22:25
 */
public class PaymentFeignFallbackFactory implements FallbackFactory<PaymentFeignService> {

    @Override
    public PaymentFeignService create(Throwable throwable) {
        return new PaymentFeignService() {
            @Override
            public String paymentInfoOk(Integer id) {
                return "-------------PaymentFeignFallbackService.paymentInfoOk ------- fallback";
            }

            @Override
            public String paymentInfoTimeout(Integer id) {
                return "-------------PaymentFeignFallbackService.paymentInfoTimeout ------- fallback";
            }
        };
    }
}
